<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>单一按钮显示隐藏</title>
    <style>
        *{
            margin: 0;
            padding: 0;
            list-style: none;
            cursor: pointer;
        }
        .box{
            width: 220px;
            margin: auto;
            background-color: #E9EDF2;
            box-sizing: border-box;
            padding: 0 10px;
        }
        
        li{
            font-size: 14px;
            margin: 10px 0;
            height: 30px;
            line-height: 30px;
        }
        li:hover{
            text-decoration: underline;
            background-color: #fff;
        }
    </style>
</head>
<body>
    <div class="box">
        <div id="tap">播放列表...</div>
        <ul id="uu">
            <li>玩家之徒-蔡依林</li>
            <li>原谅我就是这样的女生-戴佩妮</li>
            <li>猜不透-丁当</li>
            <li>自导自演-周杰伦</li>
            <li>浪漫窝-弦子</li>
            <li>流年-王菲</li>
        </ul>
    </div>

    <script>
        window.onload = function(){
            var tap = document.getElementById('tap')
            var uu = document.getElementById('uu')
           tap.onclick = function(){
               if(uu.style.display == ''){
                   uu.style.display = 'none'
               }else if(uu.style.display == 'none'){
                uu.style.display = 'block'
               }else{
                   uu.style.display = 'none'
               }
               
           }
        }
    </script>
    
</body>
</html>